Source code for /engineering/webperf/slave-v4[j1.2]/ScriptItem.javaOriginal file ScriptItem.java
   1 // 
   2 //  Chutes start from 1.  Chute #0 means "dont care"
   3 //  Users start from 1.  User # 0 is a NON-USER
   4 
   5 import java.util.*;
   6 
   7 public class ScriptItem {
   8 
   9    public final static int	tokenNone 	 = 0;
  10    public final static int	tokenName    = 1;
  11    public final static int	tokenPut   	 = 2;
  12    public final static int	tokenWait  	 = 3;
  13    public final static int	tokenEndLoop = 4;
  14    public final static int	tokenLoop  	 = 5;
  15    public final static int	tokenEnd     = 6;
  16    public final static int	tokenSync    = 7;
  17    public final static int	tokenIndexPut  = 8;
  18    public final static int	tokenIndexSet  = 9;
  19    public final static int	tokenIndexInc  = 10;
  20    public final static int	tokenChute     = 11;
  21    public final static int	tokenAssign    = 12;
  22    public final static int	tokenIndexWait = 13;
  23 
  24    public final static int	tokenBAD       = 99;
  25 
  26    public final static int	maxLoop        = 999999;
  27 
  28    public final static char	tokenDelimit	= '[';
  29    public final static char	numberDelimit	= ',';
  30    public final static char	commentChar		= '#';
  31    public final static char	idChar		= '*';
  32 
  33    public final static String  tokenTextName     = "name";   // name-supportedusers-text
  34    public final static String  tokenTextChute	 = "chutes";  // chutes-num of chutes to use-nil
  35    public final static String  tokenTextAssign	 = "assn";	 // assn-user-chute
  36 
  37    public final static String  tokenTextPut      = "put";	 // put-<useridx>-text
  38    public final static String  tokenTextIndexPut = "iput";	 // iput-nil-text
  39    public final static String  tokenTextIndexSet = "set";    // set-value-nil
  40    public final static String  tokenTextIndexInc = "inc";    // inc-nil-nil
  41    public final static String  tokenTextIndexWait = "iwait";  // iwait-value-nil
  42    public final static String  tokenTextWait     = "wait";    // wait-value-<trail an ID>
  43    public final static String  tokenTextEndLoop  = "endloop"; // endloop-nil-label
  44    public final static String  tokenTextLoop     = "loop";	  // loop-count-label
  45    public final static String  tokenTextEnd      = "end";     // end-nil-nil
  46    public final static String  tokenTextSync     = "sync";	  // sync-nil-nil
  47 
  48    public int	token;
  49    public int	count;	// used as loop count and jump location
  50    public int 	id;		// assign to a specific user/chute
  51    public String  text; 
  52 
  53    ScriptItem() {
  54 	token = tokenNone;
  55    }
  56 
  57    public int is() {
  58 	return token;
  59    }
  60    
  61 }